home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
17 Bit Software 3: The Continuation
/
17-Bit_The_Continuation_Disc.iso
/
amigan
/
amigan 10
/
driver-maker
/
prdrgn11.arc
/
PrmFil.doc
< prev
next >
Wrap
Text File
|
1987-01-22
|
10KB
|
249 lines
PrtDrvGen 1.1 / Jørgen Thomsen 870122
| Bugs corrected and enhancements in PrtDrvGen V1.1
| =================================================
|
| 1) The JFY1 (letter space, justify) and JFY2 (word fill, auto center)
| commands were not executed in V1.1 due to an AmigaDOS peculiarity
|
| 2) The description of parameters available for inclusion with the ^p, ^d,
| and ^w commands was missing from this file. Additonal information
| included as well
|
| 3) In case of the driver not being able to get enough memory for its
| buffers, it will output the string "No mem" to the printer.
Setting up the parameter file for your brand of printer.
========================================================
In the following we assume that you want to generate a driver for your
printer called MYPRINTER (the name may not contain spaces).
1) Copy NECCP6.dat to MYPRINTER.dat
2) Edit MYPRINTER.dat and change the NEC CP6 specific escape sequences to
the sequences required for your printer.
If wanted/needed change also the other parameters specifying the
operation of the driver.
| Do NOT add comments in lines with s:
| Do NOT totally delete any parameters that your printer may not need.
| PrtDrvGen expects them all to be there (eventually as empty strings
| in case of string parameters).
Numerical parameters are provided with certain commands. Each parameter
is a byte, value 0 - 255.
If you specify to the driver generator that an alphanumeric driver
without graphics should be generated, you will get a very small driver
with limited functionality e.g. Preferences will not be used for setting
up the printer, only the escape sequences specified. This may be OK for
very specific applications or for drivers (e.g. daisy wheel) with
limited graphical capabilities.
The parameters available for inclusion into the escape sequences in
case of the full featured driver with the commands ^p, ^d and ^w are
as follows for the various printer commands:
| (NOTE. the ^d command can be used for debugging purposes because it
| will display in decimal notation (3 digits) the binary parameter
| value referenced by the ^p command).
RIN:
----
Parameter 0: Lines per inch
--- 1: No of lines on one page (Preferences)
--- 2: - - - - - - (computed from form definition)
--- 3: No of lines to skip at perforation ( - - - - )
--- 4: Left margin (Preferences, first column to write, Amiga std.)
--- 5: Right margin (Preferences, last column to write, ---- )
--- 6: Left margin - 1 (last column not to write, NEC standard)
--- 7: Right margin + 1 (first column not to write, ---- )
All others:
-----------
Parameters 0 - 7 are the ones provided with the command, if any.
Additionally the following parameters are available:
IND, NEL, RI:
Parameter 0: line count before command
--- 1: line count after command
SFC, SBC:
Parameter 0: as provided by command
--- 1: Parameter 0 MOD 10
--- 2: value from colortable[Parameter 1]
STBM:
Parameter 0: current no of lines to skip at perforation
--- 1: current no of lines on page (paper length)
--- 2: Parameter 1 - Parameter 0
SLPP:
Parameter 0: current no of lines on page (paper size)
--- 1: current no of lines to skip at perforation
--- 2: Parameter 0 - Parameter 1
SLRM, CAM:
Parameter 0: as provided (CAM: 1)
--- 1: as provided (CAM: computed)
--- 2: Parameter 0 - 1
--- 3: Parameter 1 + 1
PLD, PLU:
Parameter 0: (length specified in parameter file) * (6 or 8)/8
| To use this driver for a black and white only printer do the following:
| change "Printer Class" to 1 and "Color Class" to 1. There is no need
| to change the "Sequence for printing colors" parameters.
| The colors specified in the SFC and SBC are the printer specific colors
| and will only be used if your program actually uses the SFC and SBC
| commands with an embedded ^p2/^d2/^w2 command.
| Inkjet and laser printers will often print one line of dots at a time.
| Most often that would require the "Storage of dots in buffer" parameter
| to be specified as 0 and "No of Raster Rows on each pass" as 1.
To clarify the parameters for storing dots in the buffer the following
figure of one pass (line) of a print head is presented:
X ->
Y 0
0 :::::::::::::::::::::::::::::::::::
:::::::::::::::::::::::::::::::::::
:::::::::::::::::::::::::::::::::::
:::::::::::::::::::::::::::::::::::
The dots may be stored in consecutive bytes as
a) Column by column, left to right
Byte 1: [(0,0), (0,1), (0,2) .... (0,7)] Byte 2: [(1,0), (1,1)...]
b) Column by column, right to left
Byte 1: [(0,7), (0,6), (0,5) .... (0,0)] Byte 2: [(1,7), (1,6)...]
c) Row by row, left to right
Byte 1: [(0,0), (1,0), (2,0) .... (7,0)] Byte 2: [(8,0), (9,0)...]
d) Row by row, right to left
Byte 1: [(7,0), (6,0), (5,0) .... (0,0)] Byte 2: [(15,0), (14,0)...]
| The parameters available for inclusion by the ^p, ^d, and ^w commands when
| writing graphics are the following:
|
| Parameter "0-1" Parameter "2-3"
| [xxxxxxxx xxxxxxxx] [xxxxxxxx xxxxxxxx]
| ^p0 ^p1 ^p2 ^p3 binary bytes
| ^d0 ^d1 ^d2 ^d3 3 digit decimal bytes
| ^w0 ^w2 5 digit decimal words
|
| Parameter "0-1" = ^p0 * 256 + ^p1 = ^w0
|
| At "Init graphics before/after delay":
| Parameter "0-1": no of dot columns to receive in each pass (line)
| --- "2-3": no of dots in each column
|
| These strings are output to the printer at the very beginning of
| the graphics dump. The delay between them allows for a lengthy
| reset command to finish and the printer to become ready for the
| following commands if that is needed.
| This part should be used for initializing the printer with values
| which are constant throughout the entire graphics dump e.g.
| unidirectional printing, proper line spacing to avoid white
| streaks in the picture etc.
|
| At "Color x prefix" and "Each single buffer terminated by":
| Parameter "0-1": as above + no of dot columns added to the left
| margin in order to center picture
|
| --- "2-3": no of bytes actually used for the graphics data
| for one pass (line) (size of <data for color x>
| below). In case of a 24 pin dot matrix printer
| parameter 1 = 24/8 * parameter 0. For an 8 pin
| dot matrix printer parameter 1 = parameter 0.
|
| Make sure, that the dots per inch density you typically will
| specify to the printer in these prefixes, are in accordance
| with the "Max dots in X direction" and "Dots pr. inch in X
| direction" parameters, which AmigaDOS will use for generating
| the graphics data for the printer.
|
| A typical prefix would contain:
| <CR> <select print color> <specify graphics mode and no of
| bytes/columns of data to follow>
|
| The pass (line) buffer layout is:
| <color 1 prefix> <data for color 1>
| <color 2 prefix> <data for color 2>
| <color 3 prefix> <data for color 3>
| <color 4 prefix> <data for color 4> <Each s. buf. term. by>
|
| The contens of the prefixes for the NEC CP6 driver is:
| <CR> <select print color> <specify graphics mode and how many pin
| columns of data to follow>
|
| At "Finish graphics dump":
| No parameter values available.
|
| This string (e.g. a form feed and set printer back to normal text
| state, if that is needed) is output at the very end of the
| graphics dump.
Generating the driver.
======================
Make sure, that the files MYPRINTER.dat and PrtDrv.lod are located in the
current directory. The driver generated will be located in the current
directory with the name MYPRINTER.
Execute the driver generator PrtDrvGen
PrtDrvGen
and respond to the prompt for "Alphanumeric driver without graphics (y/n)"
and "Printer driver name: " (the latter being MYPRINTER).
Generating the driver lasts appr. 30 sec. (alphamuneric) or 1.5 minute.
The sizes of the generated drivers when loaded are approx. 1 Kb and 10.5 Kb.
To make the driver available for AmigaDOS do the following:
Copy MYPRINTER To DEVS:printers
With Preferences do:
AmigaDOS 1.1:
change the printer to Custom and specify MYPRINTER as Custom Printer
Name.
After a warm boot (ctrl-Amiga-Amiga) the driver can be used
AmigaDOS 1.2:
change the printer to MYPRINTER
|Using the driver
|================
|
|The AmigaDOS printer device code and the printer specific code (printer
|drivers) will not be loaded into memory until the first output operation
|to the printer is performed. You may experience, that after this load
|nothing happens. This is most likely because the driver could not get
|enough contiguous memory for its buffers.
|
|The code of this driver is due to the added features larger than most
|other drivers, but it will in case of memory shortage reduce its memory
|requirements and execute in a slower mode. If sufficient contiguous memory
|is still not available, it will print the string "No mem" on the printer
|to inform you about this.
|
|You may avoid this by setting margins narrower with Preferences. That will
|produce a smaller picture, but it will reduce the memory requirements.
|You may also choose to print with less density, if your printer supports
|more than a single dots-per-inch mode.